//
//  NSUserDefaults+Store.h
//  AllToolsOC
//
//  Created by safiri on 2017/7/13.
//  Copyright © 2017年 safiri. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
@interface NSUserDefaults (Store)
#pragma mark - 偏好类信息存储

/**
 *  保存普通字符串
 */
+ (void)setStr:(nullable NSString *)str key:(NSString *)key;

/**
 *  读取
 */
+ (NSString *)strForKey:(NSString *)key;

/**
 *  删除
 */
+ (void)removeStrForKey:(NSString *)key;


/**
 *  保存int
 */
+ (void)setInt:(NSInteger)i key:(NSString *)key;

/**
 *  读取int
 */
+ (NSInteger)intForKey:(NSString *)key;



/**
 *  保存float
 */
+ (void)setFloat:(CGFloat)floatValue key:(NSString *)key;

/**
 *  读取float
 */
+ (CGFloat)floatForKey:(NSString *)key;



/**
 *  保存bool
 */
+ (void)setBool:(BOOL)boolValue key:(NSString *)key;

/**
 *  读取bool
 */
+ (BOOL)boolForKey:(NSString *)key;

///保存object
+ (void)setObject:(nullable id)object forKey:(NSString *)key;
///读取object
+ (nullable id)objectForKey:(NSString *)key;

@end
NS_ASSUME_NONNULL_END
